<%- @page_title = _('Editing %s', h(@teaching.title)) -%>
<h2><%= @page_title %></h2>
<%- form_for( :teaching, @teaching,
              :url => class_path(@project, @teaching),
              :html => {:class => 'form-small',
                        :method => :put,
                        :onsubmit => "Field.disable('submit-form'); Element.hide('cancel-form');"}) do |f| -%>
  <div class="form"><!--O .form-->
    <label for="teaching_start"><%= _('Start') %>:</label>
    <div class="date"><!--O .date-->
      <%= f.date_select(:start, :start_year => Time.now.year, :use_month_numbers => true, :order => [:year, :month, :day]) %>
    </div><!--C .date-->
    <%= error_message_on(:teaching, :start) %>
  </div><!--C .form-->
  <div class="form"><!--O .form-->
    <label for="teaching_end"><%= _('End') %>:</label>
    <div class="date"><!--O .date-->
      <%= f.date_select(:end, :start_year => Time.now.year, :use_month_numbers => true, :order => [:year, :month, :day]) %>
    </div><!--C .date-->
    <%= error_message_on(:teaching, :end) %>
  </div><!--C .form-->
  <div class="form"><!--O .form-->
    <%= submit_tag(_('Save Class'), :class => 'button', :id => 'submit-form') %>
    <%= link_to(_('&laquo; Back to class'), class_path(@project, @teaching), :id => 'cancel-form') %>
  </div><!--C .form-->
<%- end -%>